import { _decorator, Component, Label, Node, tween, v3 } from 'cc';
import { BasePanel } from './BasePanel';
const { ccclass, property } = _decorator;

@ccclass('TipPanel')
export class TipPanel extends BasePanel {

    panelName: string = '提示'

    @property(Label)
    tip: Label = null!

    start() {
        
    }

    showTip(tip: string, last: number = 1, onOpen?: () => void, onClose?: () => void) {
        this.tip.string = tip
        this.in('pop', onOpen)
        tween(this)
            .delay(last)
            .call(() => {
                this.out('pop', onClose)
            })
            .start()
    }

    show(): void {
        
    }

    close(): void {
        
    }
}


